﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure
{
    public static class ENodeExtension
    {
        // 增加一个枚举的扩展方法，便于下面的code注册
        public static void RegisterType<t>(this ENode.Infrastructure.Impl.DefaultTypeCodeProvider provider, AllTypeCodes code)
        {
            provider.RegisterType<t>((int)code);
        }
    }
    


    public enum AllTypeCodes
    {
        Account = 10001,
        Post = 10002,
        Reply = 10003,
        Section = 10004,
        RegisterNewAccountCommand = 10005,
        SignInAfterCommand = 06,
        SignOutAfterCommand = 10007,
        NewAccountRegisteredEvent = 10008,
        SignInAfterEvent = 10009,
        SignOutAfterEvent = 10010,
        AccountDenormalizer = 10011,
        ChangeReplyBodyCommand = 10012,
        CreateReplyCommand = 10013,
        AcceptNewReplyCommand = 10014,
        UpdatePostCommand = 10015,
        CreatePostCommand = 10016,
        ChangeSectionNameCommand = 10017,
        CreateSectionCommand = 10018,
        PostDenormalizer = 10019,
        ReplyDenormalizer = 10020,
        SectionDenormalizer = 10021,
        SectionCreatedEvent = 10022,
        SectionNameChangedEvent = 10023,
        PostCreatedEvent = 10024,
        PostUpdatedEvent = 10025,
        PostReplyStatisticInfoChangedEvent = 10026,
        ReplyCreatedEvent = 10027,
        ReplyBodyChangedEvent = 10028,
        CreateReplyProcessManager = 10029,
    }
}
